<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of GetLastPostsWP
 *
 * @author desenvolvimento01
 */
class Zend_View_Helper_GetLastPostsWP extends Zend_View_Helper_Abstract {

    public function getLastPostsWP() {

        $o = new Application_Model_DbTable_WPPOsts();

        $posts = NULL;


        foreach ($o->getSomePosts() as $post) {

            $posts .= "
                    <li>
                       <a href='{$post->getGuid()}' title='{$post->getPostTitle()}'>
                         <img src ='" . BASE_IMG . "photos/home/materias/nene.jpg' alt = '' />
                         <h2>{$post->getPostTitle()}</h2>
                         <p>" . substr($post->getPostContent(), 0, 150) . "...</p>
                       </a>
                    </li>";
        }
        return $posts;
    }

}

?>
